var qtre = qtre || {};
qtre.core = {
	
	gl : null,

	canvas : null,

	initialize : function(canvas){
		this.canvas = canvas;
		
		this.canvas.width = this.canvas.scrollWidth;
		this.canvas.height = this.canvas.scrollHeight;
		
		this.gl = tdl.webgl.setupWebGL(this.canvas);
		//initialze input system
		qtre.input.initialize(this.canvas);
		
		return this.gl;
	},

	getWidth : function(){
		return this.canvas.width;
	},

	getHeight : function(){
		return this.canvas.height;
	},

	isset : function(obj){
		if(typeof(obj) == "undefined"){
			return false;
		}
		return true;
	},

	load : function(url, param, callback){
		//use jquery temporary
		$.post(url, param, callback);
	}
}